package own.zch.api;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class Test {
	public static void main(String[] args) {
		new Test1().run();
	}
}

class Test1 implements Runnable {
	public void run() {
		List<Test2> list = new ArrayList<Test2>();
		for (int i = 0; i < 10; i++) {
			list.add(new Test2());
		}
		
		for (Test2 test2 : list) {
			test2.setaString("5");
		}
		for (Test2 test2 : list) {
			System.out.println(test2.getaString());
		}
	}

}

class Test2 {
	private String aString = "2";
	private String bString = "3";

	public String getaString() {
		return aString;
	}

	public void setaString(String aString) {
		this.aString = aString;
	}

	public String getbString() {
		return bString;
	}

	public void setbString(String bString) {
		this.bString = bString;
	}

}